// -----------------------------
// Author: 		Dhaenens Gert	
// Creation: 	10/29/2014 12:16:27 PM				
// -----------------------------

#include "SystemInfo.h"

SystemInfo::SystemInfo()
{
	GetSystemInfo(&m_SystemInfo);
}

SystemInfo::~SystemInfo()
{
}

TString SystemInfo::GetProcessorArchitecture() const
{
	TString procStr = _T("");
	switch (m_SystemInfo.wProcessorArchitecture)
	{
		case PROCESSOR_ARCHITECTURE_AMD64:
		{
			procStr = _T("x64 (AMD or Intel)");
			break;
		}
		case PROCESSOR_ARCHITECTURE_ARM:
		{
			procStr = _T("ARM");
			break;
		}
		case PROCESSOR_ARCHITECTURE_IA64:
		{
			procStr = _T("Intel Itanium-based");
			break;
		}
		case PROCESSOR_ARCHITECTURE_INTEL:
		{
			procStr = _T("x86");
			break;
		}
		case PROCESSOR_ARCHITECTURE_UNKNOWN:
		{
			procStr = _T("Unknown architecture");
			break;
		}
	}
	return procStr;
}
UInt32 SystemInfo::GetProcessorCount() const
{
	return (UInt32) m_SystemInfo.dwNumberOfProcessors;
}